<template>
	<view class="mainClass">
		<view class="mainClassTop">
			<image src="../../static/msys.png" mode=""></image>
		</view>
		
		<view class="infoList"> 
			<view class="infoListItem" >
				<view class="infoListItemTitle">
					代表之家 
				</view>
				 
				<view class="infoListItemList">
					<view class="infoListItemListItem" v-for="(item,index) of dbList" @tap="getZJ(item)">
						{{ item.dbzjDeptName }}   
					</view>
				</view>
			</view>
		</view>
		

		
	</view>
</template>

<script>
	export default {
		data() {
			return {}
		},
		onLoad() {
			this.getList()
		},
		onShow() {
			this.getList()
		},
		methods: {
			getZJ(e){
				uni.navigateTo({
					url:'/pagesB/msys/dbzjInfo/dbzjInfo?id=' + e.id
				})
			},
			getList(){
				let that = this
				let url = '/minqingzhitong/msManageDept/list';
				this.$request(url, {
					type: "1",
					pageNum:'1',
					pageSize:'999'
				} , {
					load: true
				}).then((res) => {
					if(res.code == 200){
						that.dbList = res.data.records
						that.$forceUpdate()
					}
					
				});
			}
		}
	}
</script>

<style lang="less" scoped>
	.mainClass {
		min-height: 100vh;
		background-color: #ffffff;
		.mainClassTop {
			padding: 20upx;

			image {
				width: 716upx;
				height: 252upx;
			}
		}

		
		
		.infoList{
			.infoListItem{
				.infoListItemTitle{
					line-height: 100upx;
					text-align: center;
					padding: 0 30upx;
					font-size: 17px;
					color: #333333;
					font-weight: bold;
				}
				
				.infoListItemList{
					padding: 0 30upx; 
					display: flex;
					align-items: center;
					flex-wrap: wrap;
					justify-content: space-between;
					.infoListItemListItem{
						font-size: 14px;
						padding: 20upx;
						color: #333333;
						max-width: 330upx;
						min-width: 330upx;
						background-color: #F6F6F6;
						text-align: center;
						margin-bottom: 20upx;
						overflow:hidden;
						white-space: nowrap;
						text-overflow: ellipsis;
						-o-text-overflow:ellipsis;
					}
				}
			}
		}
	}
</style>
